HotDocs Templates Overview

A HotDocs templateA word processor or form document that has been converted to HotDocs format so that it can be automated. When in template format, changeable text in the template can be replaced with variables. Other instructions can be added as well, such as instructions that create lists, condition text, and insert other templates. is a software component created using HotDocs Developer. The template contains all of the document's boilerplate text (the parts of the document which remain the same every time the document is generated), the variableA component that is used to represent changeable text (such as names, dates, numbers, etc.) in the template. Types of variables include Text, Date, Number, True/False, Multiple Choice, Computation, and Personal Information. fields (which will be replaced with new information collected during the interview), and any template logic needed (this can be repeated fields, conditional paragraphs, inserted templates etc.). The HotDocs template and the paired HotDocs component fileThe file that stores all of the components used in a template. The component file and template file are both necessary for template development and document assembly to work correctly. Template developers use Component Manager to work with components. (generated by HotDocs alongside the template) contain all the information necessary to produce multiple documents with the information gathered in a HotDocs interview.

A HotDocs Template encapsulates three important things:

  • Natively formatted content. For example, a HotDocs Template can be created right in Word; most of Word's formatting and document features can be built right into the HotDocs template. The documents you generate from such a template are native Word documents; no conversion or reformatting is necessary.
  • Embedded Document logic. HotDocs embeds the business logic necessary to produce correct documents right inside your template. Computed values, conditional logic, specialized formatting, lists or tables of arbitrary length, nested lists, etc... all the know-how necessary to draft the perfect document.
  • Data-gathering Interview. Not only does a template contain the logic HotDocs needs to produce a customized document, it also contains a definition of exactly what data is required to do so. HotDocs uses this to create a dynamic data-gathering interview based on the template. HotDocs Interviews can gather exactly the data that is necessary, leaving out the questions that are not relevant according to what's already been answered.

Generally speaking there are three types or categories of templates:

Template Type Description
Text Templates

You create and automateThe process of converting any document (text or form) into an interactive template. At its very core, automation is replacing changeable text in the document with variables. Additional automation steps include making text in the template conditional, repeating sections of the template so multiple answers can be entered, and inserting other boilerplate text into the template. a text templateA template that is created and automated in Microsoft Word or WordPerfect. It is distinguished from a form template by the fact that the underlying text of the template can be modified. (See also text document.) in a word processor, such as Microsoft Word or WordPerfect. You can modify the underlying text of a text template both as you automate the template and as you view the assembled document in the word processor. Text templates have a .DOCX, .RTF, .DOT, .WPT or .TTX file name extension.

Microsoft Word .DOT templates cannot be used with HotDocs Server.

Form Templates A form templateA template that is created and automated in HotDocs Automator. It is distinguished from a text template by the fact that the underlying text cannot be modified because it is static. (See also form document.) is based on static graphical or text content, such as a PDF document. You place variable fields directly on top of the static content so that during the document assembly process, HotDocs can overlay answers on top of the static text. When you answers are merged with the static document content, the underlying static text and formatting does not change. Form templates have a .HFT or .HPT file name extension.
Interview Templates An interview templateA template that contains a series of interview questions designed to gather information about a person (or persons) or matter. Answers are saved in an answer source file, which can then be linked to a dialog in a template that requires the same information. Generally, interview templates can be used to create a list of possible answers so users have more options to choose from gathers specific information (such as court, attorney, or client information). HotDocs saves the answers your end users provide for use in assembling documents; however, unlike text and form templates, HotDocs does not generate a document directly from an interview template. The only direct output of an interview template is an answer file. However, starting with an interview template, HotDocs can trigger subsequent assembly of additional documents using the ASSEMBLE instruction. Interview templates have a .CMPFile name extension that designates that the file is a component file. file name extension.

When you create a new template file, HotDocs creates a companion file called the component fileThe file that stores all of the components used in a template. The component file and template file are both necessary for template development and document assembly to work correctly. Template developers use Component Manager to work with components.. The component file contains information about variables and other componentA template resource file that displays or stores information about the user input/answers to merge in the final document. Examples of components include variables, dialogs, dialog elements, merge text groups, and formats.s used in the template. The component file has the same base file name as the template file, but with a .CMP file name extension. Both the template file and the component file are necessary for a template to work. Whenever you copy a HotDocs template—for example, to share a template with another user—you must be sure to copy both the template file and the component file.

The component file works in the background—as you create various components in the template, HotDocs stores the component file. Normally, each template uses its own component file, but you can make two or more templates share one component file.

Interview templates consist of only a component file; they do not have a separate template file.

Templates used with HotDocs Server also require an additional file: the template manifest (.manifest.xml). Like a component file, this file also shares the same base file name as the template except for the file name extension. It is created when you publish a template for use with HotDocs Server.

Versions of HotDocs Developer prior to 11 uploaded JavaScript (.JS) and Variable Collection (.HVC) files when publishing content for use with HotDocs Server. These files are no longer of concern when working with HotDocs Server version 11 or later.

Template Relationships

Any HotDocs template can potentially refer to (and thus rely on) other templates in two ways:

  • INSERT instructions. When one template "inserts" another, this means content and logic from the inserted template dynamically become part of the parent template. The inserted template can influence the parent template's interview (changing which questions need to be asked, for example), and the content of the inserted template becomes part of the assembled document that is produced.
  • ASSEMBLE instructions. When one template "assembles" another, this means the assembled template is "queued up" for subsequent interview and/or assembly after the current interview or assembly has been completed by the user. This is a separate operation, but it is necessary to implement the full feature set on which HotDocs template authors generally rely for proper execution of their templates.